<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML lang="en">
<HEAD>
 <LINK rel="StyleSheet" href="../BBWin.css">
 <TITLE>Svcs</TITLE>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <meta name="copyright" content="Copyright &copy; 2006 by Etienne Grignon. Licenced under GPL.">
</HEAD>
<BODY>
 <H1>Svcs</H1>
 <H3>Description</H3>
<p>
Svcs agent is used to monitor Windows services. 
</p>
<H3>Configuration</H3>
<UL>
 <LI class="OptionDirective"><b>setting</b> directive syntax :
<p>
<pre class="Config">
&lt;setting name="" value="" /&gt;
</pre>
<LI class="OptionDirective">generic settings
<p>
<table class="OptionTable" cellSpacing="0" cellPadding="0" border="1" id="table1">
	<tr>
		<td class="OptionTitle" vAlign="top" >
		name
		</td>
		<td class="OptionTitle">
		value
		</td>
	</tr>
	<tr>
		<td class="OptionValue" vAlign="top" >
		alarmcolor
		</td>
		<td class="OptionValue" vAlign="top">
		You can set the default alarm color for the svcs rules.
		It should be set to red or yellow.
		<b>Default is yellow</b>.
		</td>
	</tr>
	<tr>
		<td class="OptionValue" vAlign="top" >
		alwaysgreen
		</td>
		<td class="OptionValue" vAlign="top">
		Possible values are "true" or "false". If true, it will always send green status.
		<b>Default is false</b>.
		</td>
	</tr>
	<tr>
		<td class="OptionValue" vAlign="top" >
		autoreset
		</td>
		<td class="OptionValue" vAlign="top">
		Possible values are "true" or "false". If true, it will try to restart each service in automatic startup state
		which would be stopped. A report with the default alarm color is sent when it try to restart one 
		of these service.
		<b>Default is false</b></td>
	</tr>
	<tr>
		<td class="OptionTitle" vAlign="top" >
		comment
		</td>
		<td class="OptionValue" vAlign="top">
		A simple string which appear in the report to add a small information about the services monitored if 
		its name is not easy to understand.
		This parameter is optionnal</td>
	</tr>
	<tr>
		<td class="OptionValue" vAlign="top" >
		delay
		</td>
		<td class="OptionValue" vAlign="top">
		Svcs agent will wait the period defined in the delay setting before doing monitoring if the
		computer has restarted recently. (It may be useful for services which would start later than BBWin
		or for services which take a lot of time to start). You can specify a unit after the numeric value : "m" for minutes,
		"h" for hours, "d" for days.
		<b>Default is 5 minutes</b></td>
	</tr>
	<tr>
		<td class="OptionValue" vAlign="top" >
		testname
		</td>
		<td class="OptionValue" vAlign="top">
		You can set the testname that will be sent to the monitoring server (column name in
		the bbdisplay)
		<b>Default is "svcs"</b></td>
	</tr>
</table>
 <LI class="OptionDirective"><b>rules</b> directive syntax :
<p>
<pre class="Config">
&lt;setting name="" value="" autoreset="" alarmcolor=""/&gt;
</pre>
<p>
If the name value is not one of the generic settings, then, svcs will understand that it is a svcs custom rule.
To create a custom service rule, you may use the service display name in the setting name attribute.
</p>
<p>
<table class="OptionTable" cellSpacing="0" cellPadding="0" border="1" id="table2">
	<tr>
		<td class="OptionTitle" vAlign="top" >
		alarmcolor
		</td>
		<td class="OptionValue" vAlign="top">
		You can set the alarm color you want to use if their is an alert.
		It should be set to red or yellow.
		<b>Default alarm color is yellow</b>.
		</td>
	</tr>
	<tr>
		<td class="OptionTitle" vAlign="top" >
		autoreset
		</td>
		<td class="OptionValue" vAlign="top">
		Possible values are "true" or "false". If true, the agent will stop the agent if it should be stopped or start it
		if it should be started. (depending the value attribute).
		<b>Default value is "false"</b></td>
	</tr>
	<tr>
		<td class="OptionTitle" vAlign="top" >
		name
		</td>
		<td class="OptionValue" vAlign="top">
		name attribute should be the display name of the service you want to monitor.
		<b>Name must be the exact display name</b></td>
	</tr>
	<tr>
		<td class="OptionTitle" vAlign="top" >
		value
		</td>
		<td class="OptionValue" vAlign="top">
		Possible values are "started" or "stopped".
		<b>Default value is "started"</b></td>
	</tr>
</table>
</UL>
<H3>Examples</H3>
<UL>
 <LI>svcs is congigured to restart all service with automatic startup that would be stopped. Default alarm 
 color is set to red. To finish, the service "Automatic Updates" will be restart if its state is not 
 started and will warn with yellow color.
<p>
<pre class="Config">
&lt;svcs&gt;
	&lt;setting name="autoreset" value="true" /&gt;
	&lt;setting name="alarmcolor" value="red" /&gt;
	&lt;setting name="Automatic Updates" value="started" autoreset="true" alarmcolor="yellow" /&gt;
&lt;/svcs&gt;
</pre>
</UL>
<H3>Notes</H3>
<UL>
 <LI>no note
</UL>
</BODY>
</HTML>
